import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Layout from '@/layout/index'
const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/home',
    name: 'Home',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/views/home/home/index.vue')
      }
    ]
  },
  {
    path: '/school',
    name: 'School',
    component: Layout,
    children: [
      {
        path: 'schoolInfo',
        name: 'SchoolInfo',
        component: () => import('@/views/school/schoolInfo/index.vue')
      },
      {
        path: 'collegeInfo',
        name: 'CollegeInfo',
        component: () => import('@/views/school/collegeInfo/index.vue')
      },
      {
        path: 'facultyInfo',
        name: 'FacultyInfo',
        component: () => import('@/views/school/facultyInfo/index.vue')
      },
      {
        path: 'majorInfo',
        name: 'MajorInfo',
        component: () => import('@/views/school/majorInfo/index.vue')
      },
      {
        path: 'classInfo',
        name: 'ClassInfo',
        component: () => import('@/views/school/classInfo/index.vue')
      },
      {
        path: 'floorInfo',
        name: 'FloorInfo',
        component: () => import('@/views/school/floorInfo/index.vue')
      },
      {
        path: 'classroomInfo',
        name: 'ClassroomInfo',
        component: () => import('@/views/school/classroomInfo/index.vue')
      },
      {
        path: 'faceDevice',
        name: 'faceDevice',
        component: () => import('@/views/school/faceDevice/index.vue')
      },
      {
        path: 'rfindDevice',
        name: 'rfindDevice',
        component: () => import('@/views/school/rfindDevice/index.vue')
      },
      {
        path: 'rfindDeviceList',
        name: 'rfindDeviceList',
        component: () => import('@/views/school/rfindDeviceList/index.vue')
      }
    ]
  },
  {
    path: '/user',
    name: 'User',
    component: Layout,
    children: [
      {
        path: 'teacherInfo',
        name: 'TeacherInfo',
        component: () => import('@/views/user/teacherInfo/index.vue')
      },
      {
        path: 'studentInfo',
        name: 'StudentInfo',
        component: () => import('@/views/user/studentInfo/index.vue')
      }
    ]
  },
  {
    path: '/learn',
    name: 'Learn',
    component: Layout,
    children: [
      {
        path: 'showVideo',
        name: 'ShowVideo',
        component: () => import('@/views/learn/showVideo/index.vue')
      },
      {
        path: 'learnMaterial',
        name: 'LearnMaterial',
        component: () => import('@/views/learn/learnMaterial/index.vue')
      }
    ]
  },
  {
    path: '/carousel',
    name: 'Carousel',
    component: Layout,
    children: [
      {
        path: 'deviceCarousel',
        name: 'DeviceCarousel',
        component: () => import('@/views/carousel/deviceCarousel/index.vue')
      }
    ]
  },
  {
    path: '/video',
    name: 'Video',
    component: Layout,
    children: [
      {
        path: 'videoMonitor',
        name: 'VideoMonitor',
        component: () => import('@/views/video/videoMonitor/index.vue')
      },
      {
        path: 'videoSafetyHat',
        name: 'VideoSafetyHat',
        component: () => import('@/views/video/videoSafetyHat/index.vue')
      }
    ]
  },
  {
    path: '/personLocation',
    name: 'PersonLocation',
    component: Layout,
    children: [
      {
        path: 'locationMap',
        name: 'locationMap',
        component: () => import('@/views/personLocation/locationMap/index.vue')
      },
      {
        path: 'locationLabel',
        name: 'LocationLabel',
        component: () => import('@/views/personLocation/locationLabel/index.vue')
      },
      {
        path: 'dataAlarmLocation',
        name: 'dataAlarmLocation',
        component: () => import('@/views/personLocation/dataAlarmLocation/index.vue')
      },
      {
        path: 'locationMapSet',
        name: 'LocationMapSet',
        component: () => import('@/views/personLocation/locationMapSet/index.vue')
      },
      {
        path: 'mapArea',
        name: 'mapArea',
        component: () => import('@/views/personLocation/mapArea/index.vue')
      },
      {
        path: 'locationMapArea',
        name: 'LocationMapArea',
        component: () => import('@/views/personLocation/locationMapArea/index.vue')
      }
    ]
  },
  {
    path: '/device',
    name: 'Device',
    component: Layout,
    children: [
      {
        path: 'deviceClass',
        name: 'DeviceClass',
        component: () => import('@/views/device/deviceClass/index.vue')
      },
      {
        path: 'deviceAlarmStatus',
        name: 'DeviceAlarmStatus',
        component: () => import('@/views/device/deviceAlarmStatus/index.vue')
      },
      {
        path: 'deviceIcon',
        name: 'DeviceIcon',
        component: () => import('@/views/device/deviceIcon/index.vue')
      },
      {
        path: 'devicePointIndex',
        name: 'DevicePointIndex',
        component: () => import('@/views/device/devicePointIndex/index.vue')
      },
      {
        path: 'deviceInfo',
        name: 'DeviceInfo',
        component: () => import('@/views/device/deviceInfo/index.vue')
      },
      {
        path: 'deviceMonitor',
        name: 'DeviceMonitor',
        component: () => import('@/views/device/deviceMonitor/index.vue')
      },
      {
        path: 'deviceLearn',
        name: 'DeviceLearn',
        component: () => import('@/views/device/deviceLearn/index.vue')
      },
      {
        path: 'deviceReport',
        name: 'deviceReport',
        component: () => import('@/views/device/deviceReport/index.vue')
      },
      {
        path: 'reportTemplate',
        name: 'reportTemplate',
        component: () => import('@/views/device/reportTemplate/index.vue')
      },
      {
        path: 'deviceControl',
        name: 'DeviceControl',
        component: () => import('@/views/device/deviceControl/index.vue')
      },
      {
        path: 'devicePoint',
        name: 'DevicePoint',
        component: () => import('@/views/device/devicePoint/index.vue')
      },
      {
        path: 'deviceParam',
        name: 'DeviceParam',
        component: () => import('@/views/device/deviceParam/index.vue')
      },
      {
        path: 'deviceExperiment',
        name: 'DeviceExperiment',
        component: () => import('@/views/device/deviceExperiment/index.vue')
      },
      {
        path: 'deviceExperimentParam',
        name: 'DeviceExperimentParam',
        component: () => import('@/views/device/deviceExperimentParam/index.vue')
      },
      {
        path: 'deviceExperimentPoint',
        name: 'DeviceExperimentPoint',
        component: () => import('@/views/device/deviceExperimentPoint/index.vue')
      },
      {
        path: 'deviceSparePart',
        name: 'DeviceSparePart',
        component: () => import('@/views/device/deviceSparePart/index.vue')
      }
    ]
  },
  {
    path: '/threeDimensional',
    name: 'ThreeDimensional',
    component: Layout,
    children: [
      {
        path: 'threeDimensionalModel',
        name: 'ThreeDimensionalModel',
        component: () => import('@/views/threeDimensional/threeDimensionalModel/index.vue')
      }
    ]
  },
  {
    path: '/technology',
    name: 'Technology',
    component: Layout,
    children: [
      {
        path: 'technologyParamClass',
        name: 'TechnologyParamClass',
        component: () => import('@/views/technology/technologyParamClass/index.vue')
      },
      {
        path: 'technologyDevice',
        name: 'TechnologyDevice',
        component: () => import('@/views/technology/technologyDevice/index.vue')
      },
      {
        path: 'technologyDeviceMonitor',
        name: 'TechnologyDeviceMonitor',
        component: () => import('@/views/technology/technologyDeviceMonitor/index.vue')
      },
      {
        path: 'technologyDeviceParam',
        name: 'TechnologyDeviceParam',
        component: () => import('@/views/technology/technologyDeviceParam/index.vue')
      },
      {
        path: 'technologyStandBookPlan',
        name: 'TechnologyStandBookPlan',
        component: () => import('@/views/technology/technologyStandBookPlan/index.vue')
      },
      {
        path: 'technologyDeviceLabel',
        name: 'TechnologyDeviceLabel',
        component: () => import('@/views/technology/technologyDeviceLabel/index.vue')
      }
    ]
  },
  {
    path: '/energyConsumption',
    name: 'EnergyConsumption',
    component: Layout,
    children: [
      {
        path: 'energyConsumptionParam',
        name: 'EnergyConsumptionParam',
        component: () => import('@/views/energyConsumption/energyConsumptionParam/index.vue')
      },
      {
        path: 'energyConsumptionDevice',
        name: 'EnergyConsumptionDevice',
        component: () => import('@/views/energyConsumption/energyConsumptionDevice/index.vue')
      },
      {
        path: 'energyConsumptionDeviceParam',
        name: 'EnergyConsumptionDeviceParam',
        component: () => import('@/views/energyConsumption/energyConsumptionDeviceParam/index.vue')
      }
    ]
  },
  {
    path: '/environmentProtection',
    name: 'EnvironmentProtection',
    component: Layout,
    children: [
      {
        path: 'environmentProtectionDevice',
        name: 'EnvironmentProtectionDevice',
        component: () => import('@/views/environmentProtection/environmentProtectionDevice/index.vue')
      },
      {
        path: 'environmentProtectionDeviceParam',
        name: 'EnvironmentProtectionDeviceParam',
        component: () => import('@/views/environmentProtection/environmentProtectionDeviceParam/index.vue')
      }
    ]
  },
  {
    path: '/inspection',
    name: 'Inspection',
    component: Layout,
    children: [
      {
        path: 'inspectionDevice',
        name: 'InspectionDevice',
        component: () => import('@/views/inspection/inspectionDevice/index.vue')
      },
      {
        path: 'inspectionDeviceParam',
        name: 'InspectionDeviceParam',
        component: () => import('@/views/inspection/inspectionDeviceParam/index.vue')
      },
      {
        path: 'inspectionPoint',
        name: 'InspectionPoint',
        component: () => import('@/views/inspection/inspectionPoint/index.vue')
      },
      {
        path: 'networkCellEquipment',
        name: 'networkCellEquipment',
        component: () => import('@/views/inspection/networkCellEquipment/index.vue')
      },
      {
        path: 'inspectionRoute',
        name: 'InspectionRoute',
        component: () => import('@/views/inspection/inspectionRoute/index.vue')
      },
      {
        path: 'inspectionRoutePoint',
        name: 'InspectionRoutePoint',
        component: () => import('@/views/inspection/inspectionRoutePoint/index.vue')
      },
      {
        path: 'inspectionPlan',
        name: 'InspectionPlan',
        component: () => import('@/views/inspection/inspectionPlan/index.vue')
      },
      {
        path: 'inspectionTask',
        name: 'InspectionTask',
        component: () => import('@/views/inspection/inspectionTask/index.vue')
      },
      {
        path: 'inspectionTaskResult',
        name: 'InspectionTaskResult',
        component: () => import('@/views/inspection/inspectionTaskResult/index.vue')
      },
      {
        path: 'presetPoint',
        name: 'presetPoint',
        component: () => import('@/views/inspection/presetPoint/index.vue')
      }
    ]
  },
  {
    path: '/statistic',
    name: 'Statistic',
    component: Layout,
    children: [
      {
        path: 'dataDeviceExperiment',
        name: 'DataDeviceExperiment',
        component: () => import('@/views/statistic/dataDeviceExperiment/index.vue')
      },
      {
        path: 'dataShowVideo',
        name: 'DataShowVideo',
        component: () => import('@/views/statistic/dataShowVideo/index.vue')
      },
      {
        path: 'dataLearnMaterial',
        name: 'DataLearnMaterial',
        component: () => import('@/views/statistic/dataLearnMaterial/index.vue')
      },
      {
        path: 'dataDeviceRepair',
        name: 'DataDeviceRepair',
        component: () => import('@/views/statistic/dataDeviceRepair/index.vue')
      },
      {
        path: 'dataAlarmDevice',
        name: 'DataAlarmDevice',
        component: () => import('@/views/statistic/dataAlarmDevice/index.vue')
      },
      {
        path: 'dataStandBookTechnology',
        name: 'DataStandBookTechnology',
        component: () => import('@/views/statistic/dataStandBookTechnology/index.vue')
      },
      {
        path: 'dataAlarmTechnologyRun',
        name: 'DataAlarmTechnologyRun',
        component: () => import('@/views/statistic/dataAlarmTechnologyRun/index.vue')
      },
      {
        path: 'dataAlarmTechnology',
        name: 'DataAlarmTechnology',
        component: () => import('@/views/statistic/dataAlarmTechnology/index.vue')
      },
      {
        path: 'dataAlarmEnergyConsumption',
        name: 'DataAlarmEnergyConsumption',
        component: () => import('@/views/statistic/dataAlarmEnergyConsumption/index.vue')
      },
      {
        path: 'dataAlarmEnvironmentProtection',
        name: 'DataAlarmEnvironmentProtection',
        component: () => import('@/views/statistic/dataAlarmEnvironmentProtection/index.vue')
      },
      {
        path: 'dataAlarmInspection',
        name: 'DataAlarmInspection',
        component: () => import('@/views/statistic/dataAlarmInspection/index.vue')
      },
      {
        path: 'dataAlarmSafetyHat',
        name: 'DataAlarmSafetyHat',
        component: () => import('@/views/statistic/dataAlarmSafetyHat/index.vue')
      }
    ]
  },
  {
    path: '/analysis',
    name: 'Analysis',
    component: Layout,
    children: [
      {
        path: 'dataAnalysisTechnology',
        name: 'DataAnalysisTechnology',
        component: () => import('@/views/analysis/dataAnalysisTechnology/index.vue')
      },
      {
        path: 'dataAnalysisEnergyConsumption',
        name: 'DataAnalysisEnergyConsumption',
        component: () => import('@/views/analysis/dataAnalysisEnergyConsumption/index.vue')
      },
      {
        path: 'dataAnalysisEnvironmentProtection',
        name: 'DataAnalysisEnvironmentProtection',
        component: () => import('@/views/analysis/dataAnalysisEnvironmentProtection/index.vue')
      },
      {
        path: 'dataAnalysisInspection',
        name: 'DataAnalysisInspection',
        component: () => import('@/views/analysis/dataAnalysisInspection/index.vue')
      },
      {
        path: 'dataAnalysisDevice',
        name: 'dataAnalysisDevice',
        component: () => import('@/views/analysis/dataAnalysisDevice/index.vue')
      }
    ]
  },
  {
    path: '/system',
    name: 'System',
    component: Layout,
    children: [
      {
        path: 'sysRole',
        name: 'SysRole',
        component: () => import('@/views/system/sysRole/index.vue')
      },
      {
        path: 'sysUser',
        name: 'SysUser',
        component: () => import('@/views/system/sysUser/index.vue')
      },
      {
        path: 'sysVersion',
        name: 'SysVersion',
        component: () => import('@/views/system/sysVersion/index.vue')
      },
      {
        path: 'sysLog',
        name: 'SysLog',
        component: () => import('@/views/system/sysLog/index.vue')
      },
      {
        path: 'systemSettings',
        name: 'systemSettings',
        component: () => import('@/views/system/systemSettings/index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  // mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router
